import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { MenusComponent } from './menus.component';
import { MenuAddComponent } from './menu-add/menu-add.component';
import { MenuDetailComponent } from './menu-detail/menu-detail.component';
import { MenuUpdateComponent } from './menu-update/menu-update.component';
import { MenuOperationComponent } from './menu-operation/menu-operation.component';

const routes: Routes = [
  // {
  //   path :"",
  //   component: MenusComponent,
  //   children :[
  //     {
  //       path :"add",
  //       component :MenuAddComponent
  //     },
  //     {
  //       path :"detail",
  //       component :MenuDetailComponent
  //     },
  //     {
  //       path :"operation",
  //       component :MenuOperationComponent
  //     },
  //     {
  //       path :"update",
  //       component :MenuUpdateComponent
  //     }
  //   ]
  // }
  {
    path :"",
    component: MenusComponent,
  },
  {
    path :"add",
    component :MenuAddComponent
  },
  {
    path :"detail",
    component :MenuDetailComponent
  },
  {
    path :"operation",
    component :MenuOperationComponent
  },
  {
    path :"update",
    component :MenuUpdateComponent
  }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule],
  providers: []
})
export class MenusRoutingModule { }
